How do I boot [embedded] linux from sd card?

Posted by Brandon Yates on Super User See other posts from Super User or by Brandon Yates
Published on 2012-12-19T21:09:58Z Indexed on 2012/12/19 23:05 UTC
Read the original article Hit count: 362

Filed under:
|
|

I am hacking together a quick embedded linux system on a DM816x evm board. Previously I have been using TFTP and NFS to load my kernel and root filesystem to the board. I am now trying to switch over to loading everything from an SD card.

I have my card partitioned such that uBoot and my kernel image are in one partition, and my rootFS in another partition. At power-on, Uboot starts correctly and successfully launches the kernel. However, the kernel is unable to mount the root file system. It appears that it doesn't recognize any SD (mmc) cards. It gives this error message.

VFS: Cannot open root device "mmcblk0p2" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00             256 mtdblock0  (driver?)
1f01               8 mtdblock1  (driver?)
1f02            2560 mtdblock2  (driver?)
1f03            1272 mtdblock3  (driver?)
1f04            2432 mtdblock4  (driver?)
1f05             128 mtdblock5  (driver?)
1f06            4352 mtdblock6  (driver?)
1f07          204928 mtdblock7  (driver?)
1f08           50304 mtdblock8  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

I feel like I'm missing something fundamental here. Why does it not recognize the root device I am trying to load from?

Here is my uBoot boot script that is running:

setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw mem=124M earlyprink vram=50M ti816xfb.vram=0:16M,1:16M,2:6M ip=off noinitrd;mmc init;fatload mmc 1 0x80009000 uImage;bootm 0x80009000

© Super User or respective owner

Related posts about linux

Related posts about embedded